package lumingweihua.future.cn.baselibgxh.base;

import android.text.TextUtils;
import android.view.View;

import lumingweihua.future.cn.baselibgxh.R;
import lumingweihua.future.cn.baselibgxh.utils.Constant;

/**
 * Created by Administrator on 2018/4/14.
 */

public class UpdateNameActivity extends BaseActivity {
    @Override
    protected void initView() {
        setContentView(R.layout.activity_update_type);
        initTitleBar("", Constant.DEFAULT_LEFT_BACK,null);
        findViewById(R.id.bt_ok).setOnClickListener(this);;
    }

    @Override
    protected void initData() {

    }

    @Override
    protected void processClick(View v) {
        if(v.getId() == R.id.bt_ok){
            String num = findTextView(R.id.et_name).getText().toString();
            if(TextUtils.isEmpty(num)){
                showToast("请输入货物类型");
                return;
            }
            setResult(RESULT_OK,getIntent().putExtra("name",num));
            finish();
        }
//        switch (v.getId()) {
//            case R.id.bt_ok:
//
//                break;
//
//            default:
//                break;
//        }
    }
}
